package org.springframework.samples.mvc.basic.edinicamerka;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.samples.mvc.basic.controller.CRUDController;
import org.springframework.samples.mvc.basic.gotovproizvod.GotovProizvodView;
import org.springframework.samples.mvc.basic.model.ReflectionModel;
import org.springframework.samples.mvc.basic.model.UIFormModel;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.proba.annotations.pojo.EdinicaMerka;

@Controller
@RequestMapping(value="/edinicaMerkaView")
public class EdinicaMerkaController extends CRUDController<EdinicaMerkaView> {

	@Autowired
	public EdinicaMerkaController(EdinicaMerkaBusinessService service) {
		super(service);
	}

	@Override
	protected Class<EdinicaMerkaView> getPojoClass() {
		return EdinicaMerkaView.class;
	}

	@Override
	protected EdinicaMerkaView createNewObject() {
		return new EdinicaMerkaView();
	}

	@Override
	protected String getLowerCapitalizedClassName() {
		return "edinicaMerkaView";
	}

	@Override
	protected UIFormModel[] getDetailModels() {
		return new UIFormModel[]{new ReflectionModel<GotovProizvodView>(GotovProizvodView.class, "id")};
	}

}
